package com.jbl.gof23.structure.bridging;

public abstract class Computer {

    //组合品牌
    protected Brand brand;
    public Computer (Brand brand){
        this.brand = brand;
    }

    public void info(){
        brand.info();
    }
}


class Desktop extends Computer{

    public Desktop(Brand brand) {
        super(brand);
    }

    @Override
    public void info() {
        super.info();
        System.out.println("台式机");
    }
}

class bijiben extends Computer{

    public bijiben(Brand brand) {
        super(brand);
    }

    @Override
    public void info() {
        super.info();
        System.out.println("笔记本");
    }
}